package com.wyh.domain.vo.gfive.treeVo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Api("用于生成树的房间VO")
@TableName("resource")
public class RoomVO {
    @ApiModelProperty("主键")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("资源类型，0房屋、1车位")
    @NotNull(message = "资源类型不能为空")
    private Integer type;

    @ApiModelProperty("资源编号")
    @NotBlank(message = "资源编号不能为空或者空字符串")
    private String number;

    @ApiModelProperty("所属层级")
    @TableField("buildingid")
    @NotNull(message = "所属层级id不能为空")
    private Integer buildingId;

    @ApiModelProperty("是否是虚拟资源，0是，1否")
    @TableField("isvirtual")
    @NotNull(message = "是否为虚拟资源不能为空")
    private Integer isVirtual;

    @ApiModelProperty("资源名称")
    @NotBlank(message = "name不能为空或空字符串")
    private String name;

    @ApiModelProperty("资源状态，0未接房、1空闲、2已出租、3失效")
    @NotNull(message = "资源状态不能为空")
    private Integer state;

    @ApiModelProperty("完整的资源名称")
    @TableField("infoname")
    @NotBlank(message = "完整的资源名称不能为空或空字符串")
    private String infoName;
}
